package com.leyou.common.vo;

import lombok.Data;

import java.util.List;

/**
 * 处理请求和响应的方法
 *
 * @version V1.0
 * @package com.leyou.common.vo
 * @description:
 * @author: pc
 * @date: 2019/6/25 14:13
 */
@Data
public class PageResult<T> {
    // 总条数
    private Long total;
    // 总页数
    private Integer totalPage;
    // 当前页数据
    private List<T> items;

    public PageResult() {
    }

    public PageResult(Long total, List<T> items) {
        this.total = total;
        this.items = items;
    }

    public PageResult(Long total, Integer totalPage, List<T> items) {
        this.total = total;
        this.totalPage = totalPage;
        this.items = items;
    }
}

